<?php 
	if ( $wp_query->have_posts() || dynamic_sidebar('sidebar-1')) { ?>
		<div class="page-content">
			<div class="page-sidebar-wrapper">
				<div class="row">
			
					<aside id="main-sidebar" class="col-xs-12 col-sm-3 col-sm-push-9 post-sidebar">
						<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-1') ) : ?>
						<?php endif;?> 
					</aside>
						
					<?php 
						if($wp_query->have_posts()){
							echo '<div class="col-xs-12 col-sm-9 col-sm-pull-3"><div class="articles-wrapper"><div class="row">'; //start loop
							 while ( $wp_query->have_posts() ) : $wp_query->the_post(); // run the loop
							get_template_part( 'template-parts/category/category', $category_slug);
							endwhile;
							echo '</div></div>';
							
							if ( $wp_query->max_num_pages > 1 ) :
								require( 'pagination.php');
							endif;
							echo '</div>';
						}// end loop
					?>
					
				</div>
			</div>
		</div>
<?php } 
	wp_reset_query();
?>